package com.five.service.impl;

import com.five.dao.BusinessActivitiesMapper;
import com.five.entity.BusinessActivities;
import com.five.service.BusinessActivityService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * Created by Administrator on 2018/2/26.
 */
@Service("BusinessActivityService")
public class BusinessActivityServiceImpl implements BusinessActivityService {

    @Autowired
    private BusinessActivitiesMapper businessActivitiesMapper;

    @Override
    public void addBusinessActivity(BusinessActivities businessActivities) {
        businessActivitiesMapper.insertSelective(businessActivities);
    }

    @Override
    public List<BusinessActivities> selectActivitiesByUserId(Integer userId) {
        return businessActivitiesMapper.selectByUserId(userId);
    }

    @Override
    public BusinessActivities selectByPrimaryKey(Integer id) {
        return businessActivitiesMapper.selectByPrimaryKey(id);
    }
}
